﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace AbpCompanyName.AbpProjectName.Migrations;

public partial class Upgraded_To_Abp_5_9 : Migration
{
    protected override void Up(MigrationBuilder migrationBuilder)
    {
        migrationBuilder.DropIndex(
            name: "IX_AbpOrganizationUnits_TenantId_Code",
            table: "AbpOrganizationUnits");

        migrationBuilder.CreateIndex(
            name: "IX_AbpOrganizationUnits_TenantId_Code",
            table: "AbpOrganizationUnits",
            columns: new[] { "TenantId", "Code" });
    }

    protected override void Down(MigrationBuilder migrationBuilder)
    {
        migrationBuilder.DropIndex(
            name: "IX_AbpOrganizationUnits_TenantId_Code",
            table: "AbpOrganizationUnits");

        migrationBuilder.CreateIndex(
            name: "IX_AbpOrganizationUnits_TenantId_Code",
            table: "AbpOrganizationUnits",
            columns: new[] { "TenantId", "Code" },
            unique: true,
            filter: "[TenantId] IS NOT NULL");
    }
}
